package org.shagin.jfin.ui.budget.item.impl;

import java.awt.BorderLayout;

import javax.swing.JLabel;


/**
 * The Class BudgetItemUnknown.
 */
public class UnknownView extends AbstractBudgetItemView {

    private static final long serialVersionUID = -7703471728070393492L;

    private JLabel label = new JLabel();

    /**
     * Instantiates a new budget item unknown.
     */
    public UnknownView() {
        super();
        setLayout(new BorderLayout());
        label.setVerticalAlignment(JLabel.CENTER);
        label.setHorizontalAlignment(JLabel.CENTER);
        add(label, BorderLayout.CENTER);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setBudgetItem(Object budgetItem) {
        super.setBudgetItem(budgetItem);
        label.setText(budgetItem.getClass().getName() + " : "
                + budgetItem.toString());
    }

}
